package Day02;

import java.util.Scanner;

public class Demo07 {
    public static void main(String[] args) {
        //计算应缴金额
        double sum = 0;//定义一个初始值
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入购物金额：");
        int i = sc.nextInt();
        System.out.println("请输入积分：");
        int b = sc.nextInt();
        if(b < 0){
            System.out.println("请输入正确的金额！");
        } else if(b <= 2000){
            sum = i*0.9;
        }else if(b <= 4000){
            sum = i*0.8;
        }else if(b <= 8000){
            sum = i*0.75;
        }else{
            sum = i*07;
        }
        System.out.println("您应缴的金额为：" + sum);
    }
}
